import { request } from '@/utils/request.js'

/**
 * 预报管理 API JS
 */

export default {

  /**
   * 获取预报管理分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'prediction/manage/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加预报管理
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'prediction/manage/save',
      method: 'post',
      data
    })
  },

  /**
   * 更新预报管理数据
   * @returns
   */
  update (id, data = {}) {
    return request({
      url: 'prediction/manage/update/' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取预报管理
   * @returns
   */
  read (id) {
    return request({
      url: 'prediction/manage/read/' + id,
      method: 'get',
      data
    })
  },

  /**
   * 将预报管理删除，有软删除则移动到回收站
   * @returns
   */
  deletes (data) {
    return request({
      url: 'prediction/manage/delete',
      method: 'delete',
      data
    })
  },

  /**
   * 从回收站获取预报管理数据列表
   * @returns
   */
  getRecycleList (params = {}) {
    return request({
      url: 'prediction/manage/recycle',
      method: 'get',
      params
    })
  },

  /**
   * 恢复预报管理数据
   * @returns
   */
  recoverys (data) {
    return request({
      url: 'prediction/manage/recovery',
      method: 'put',
      data
    })
  },

  /**
   * 真实删除预报管理
   * @returns
   */
  realDeletes (data) {
    return request({
      url: 'prediction/manage/realDelete',
      method: 'delete',
      data
    })
  },

  /**
   * 更改预报管理数据
   * @returns
   */
  changeStatus (data = {}) {
    return request({
      url: 'prediction/manage/changeStatus',
      method: 'put',
      data
    })
  },

  /**
   * 修改预报管理数值数据，自增自减
   * @returns
   */
  numberOperation (data = {}) {
    return request({
      url: 'prediction/manage/numberOperation',
      method: 'put',
      data
    })
  },

  /**
   * 预报管理导入
   * @returns
   */
  importExcel (data = {}) {
    return request({
      url: 'prediction/manage/import',
      method: 'post',
      data
    })
  },

  /**
   * 预报管理下载模板
   * @returns
   */
  downloadTemplate () {
    return request({
      url: 'prediction/manage/downloadTemplate',
      method: 'post',
      responseType: 'blob'
    })
  },

  /**
   * 预报管理导出
   * @returns
   */
  exportExcel (params = {}) {
    return request({
      url: 'prediction/manage/export',
      method: 'post',
      responseType: 'blob',
      params
    })
  },
  /**
   * 分单受理
   * @returns
   */

  getPredictionById (params = {}){
    return request({
      url: 'prediction/manage/getPredictionById',
      method: 'post',
      params
    })
  },
  /**
   * 设置原票号
   * @returns
   */
  setPredictionById(params = {}){
    return request({
      url: 'prediction/manage/setPredictionById',
      method: 'post',
      params
    })
  },

  /**
   * 仓储列表
   * @returns
   */
  getWareHouse(params = {}) {
    return request({
      url: 'prediction/manage/getWareHouse',
      method: 'post',
      params
    })
  },
/**
   * 仓储列表  横 纵 层 数据
   * @returns
   */
getWareHouseHeng(params = {}) {
  return request({
    url: 'prediction/manage/getWareHouseHeng',
    method: 'post',
    params
  })
},
/**
   * 仓储列表 提交 横 纵 层 数据
   * @returns
   */
warehousesave (data = {}) {
  return request({
    url: 'warehouse/order/save',
    method: 'post',
    data
  })
},  

// 导入列表 importSave
importSave(data = {}){
  return request({
    url: 'prediction/manage/importSave',
    method: 'post',
    data
  })
},
/**
   * 更新预报管理数据
   * @returns
   */
zhuangxieUpdata (id, data = {}) {
  return request({
    url: 'prediction/manage/sendLoad/' + id,
    method: 'put',
    data
  })
},

// 修改是否仓储
changeServeType(data = {}){
  return request({
    url: 'prediction/manage/changeServeType',
    method: 'post',
    data
  })
},
/**
   * 匹配客户
   * @returns
   */
getBatUpdate (data = {}) {
  return request({
    url: 'prediction/manage/batUpdate',
    method: 'post',
    data
  })
},
/**
   * 下发装卸
   * @returns
   */
getComeSet (data = {}) {
  return request({
    url: 'prediction/manage/comeSet',
    method: 'post',
    data
  })
},

/**
   * 确认到站
   * @returns
   */
getsetComeTime (data = {}) {
  return request({
    url: 'prediction/manage/setComeTime',
    method: 'post',
    data
  })
},


/**
   * 确认\发货
   * @returns
   */
confimSend (data = {}) {
  return request({
    url: 'prediction/manage/confimSend',
    method: 'post',
    data
  })
},

/**
   * 到货\发货   列表合计
   * @returns
   */
getManageTotal (params = {}) {
  return request({
    url: 'prediction/manage/total',
    method: 'get',
    params
  })
},
}




